import {
  myRequest
} from '@/common/request.js'
// 第四个参数为true 的话是不用携带用户信息

/**
 大厅列表
 */
export function coinList(params) {
  return myRequest(
    '/api/exchange/coinList',
    'POST',
    params
  )
}


/**
 买币
 */
export function coinBuyOrder(params) {
  return myRequest(
    '/api/exchange/buyOrderDetails',
    'POST',
    params
  )
}

/**
 卖币
 */
export function coinSellOrder(params) {
  return myRequest(
    '/api/exchange/sellOrderDetails',
    'POST',
    params
  )
}


/**
 K线
 */
export function getKLine(params) {
  return myRequest(
    '/api/exchange/kLine',
    'POST',
    params
  )
}

/**
 我的交易
 */
export function getMydealList(params) {
  return myRequest(
    '/api/exchange/myrelease',
    'POST',
    params
  )
}

/**
 取消发布
 */
export function putCancelOrder(params) {
  return myRequest(
    '/api/exchange/unpublish',
    'POST',
    params
  )
}

/**
 发布订单渲染
 */
export function getApplyInfo(params) {
  return myRequest(
    '/api/exchange/releaseindex',
    'POST',
    params
  )
}

/**
 发布交易
 */
export function putIssueApply(params) {
  return myRequest(
    '/api/exchange/release',
    'POST',
    params
  )
}

/**
收款方式渲染
 */
export function getReceiveMoneyWayIndex(params) {
  return myRequest(
    '/api/personal/paymentInfo',
    'POST',
    params
  )
}

/**
收款方式
 */
export function putReceiveMoneyWay(params) {
  return myRequest(
    '/api/personal/paymentMethod',
    'POST',
    params
  )
}

/**
 *验证码
 */
export function userCode(params) {
  return myRequest(
    '/api/sms/sendVer',
    'POST',
    params
  )
}

/**
 交易详情
 */

export function getOrderDetail(params) {
  return myRequest(
    '/api/exchange/uploadVoucherykb',
    'POST',
    params
  )
}

/**
 上传凭证
 */
export function putUploadOrder(params) {
  return myRequest(
    '/api/exchange/uploadVoucherykbPost',
    'POST',
    params
  )
}

/**
 确认凭证
 */
export function putSureOrder(params) {
  return myRequest(
    '/api/exchange/confirmYkbOrder',
    'POST',
    params
  )
}

/**
 订单申诉
 */
export function putAppealOrder(params) {
  return myRequest(
    '/api/exchange/applyOrderykb',
    'POST',
    params
  )
}

export function download(params) {
  return myRequest(
    '/api/upload/upload',
    'POST',
    params
  )
}
